package com.java_foundation.base_demo.test_4;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;

/**
 * @program: java_foundation
 * @description: 成员变量、局部变量
 * @author: xiongbangwen <Email>xiongbangwen@163.com</Email>
 * @create: 2020-05-31 02:08
 **/
public class Variable {
    static int s;
    int i;
    int j;
    {
        int i = 1;
        i++;
        j++;
        s++;
    }
    public void test(int j){
        j++;
        i++;
        s++;
    }

    public static void main(String[] args) throws IOException {
//        Variable obj1 = new Variable();
//        Variable obj2 = new Variable();
//        obj1.test(10);
//        obj1.test(20);
//        obj2.test(30);
//        System.out.println(obj1.i+","+obj1.j+","+obj1.s);
//        System.out.println(obj2.i+","+obj2.j+","+obj2.s);
        URL url = new URL("https://blog.csdn.net/kevin___dd/article/details/106589317");
        InputStreamReader in = new InputStreamReader(url.openStream());
        BufferedReader br = new BufferedReader(in);
        String aLine;
        while ((aLine = br.readLine())!=null){
            System.out.println(aLine);
        }
    }
}
